package com.papercutting.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.papercutting.platform.entity.Banner;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 轮播图Mapper接口
 */
@Mapper
public interface BannerMapper extends BaseMapper<Banner> {
    
    /**
     * 获取有效的轮播图列表
     */
    List<Banner> selectActiveBanners(@Param("currentTime") LocalDateTime currentTime);
    
    /**
     * 批量更新状态
     */
    int batchUpdateStatus(@Param("ids") List<Long> ids, @Param("status") Integer status);
}